package com.gxa.saas.core.entity.dto.luoj;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_collection")
public class CollectionDTO implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 收藏id主键
     */
    @TableId(value = "col_id", type = IdType.AUTO)
    private Long colId;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为null")
    private Long userId;

    /**
     * 商品id
     */
    @NotNull(message = "商品id不能为null")
    private Long commodityId;
}
